﻿<baseview:BaseView x:Class="CharacterCreation.Views.CharacterNewView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:baseview="clr-namespace:CharacterCreation.Views.Contracts"             
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    
    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <Style TargetType="TextBlock">
                <Setter Property="Margin" Value="2" />
            </Style>
            <Style TargetType="TextBox">
                <Setter Property="Margin" Value="2" />
                <Setter Property="Height" Value="24" />
            </Style>
            <Style TargetType="ComboBox">
                <Setter Property="Margin" Value="2" />
                <Setter Property="Height" Value="24" />
            </Style>
        </Grid.Resources>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="3*" />
        </Grid.ColumnDefinitions>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <TextBlock Text="Name:"  Grid.Column="0" Grid.Row="0" />
        <TextBox Text="{Binding Character.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="0" />

        <TextBlock Text="Age:"  Grid.Column="0" Grid.Row="1" />
        <TextBox Text="{Binding Character.Age, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="1" />

        <TextBlock Text="Alignment:"  Grid.Column="0" Grid.Row="2" />
        <TextBox Text="{Binding Character.Alignment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="2" />

        <TextBlock Text="Edge:"  Grid.Column="0" Grid.Row="3" />
        <TextBox Text="{Binding Character.Edge, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="3" />

        <TextBlock Text="Race:"  Grid.Column="0" Grid.Row="4" />
        <ComboBox ItemsSource="{Binding Races}" SelectedItem="{Binding Character.Race, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                  Grid.Column="1" Grid.Row="4" />

        <TextBlock Text="Profession:"  Grid.Column="0" Grid.Row="5" />
        <ComboBox ItemsSource="{Binding Professions}" SelectedItem="{Binding Character.Profession, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                  Grid.Column="1" Grid.Row="5" />

        <TextBlock Text="Description:"  Grid.Column="0" Grid.Row="6" />
        <TextBox Text="{Binding Character.Description, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="6" Height="75" 
                 AcceptsReturn="True" ScrollViewer.VerticalScrollBarVisibility="Auto" TextWrapping="Wrap"/>
    </Grid>
</baseview:BaseView>
